import request from '@/utils/request'

// 查询监控球事件列表
export function listBoll(query) {
  return request({
    url: '/aqsc/monitorboll/list',
    method: 'get',
    params: query
  })
}

// 根据id查询详细
export function getBoll(bollId) {
  return request({
    // url: '/scyf/monitorboll/' + parseStrEmpty(eventId),
    url: '/aqsc/monitorboll/' + bollId,
    method: 'get'
  })
}

//获取验证码
export function getYanZhengMa(){
  return request({
    url:'/aqsc/monitorboll/yanzhengma',
    method:'get'
  })
}

// 新增球事件
export function addBoll(data) {
  return request({
    url: '/aqsc/monitorboll',
    method: 'post',
    data: data
  })
}

// 修改球事件
export function updateBoll(data) {
  return request({
    url: '/aqsc/monitorboll',
    method: 'put',
    data: data
  })
}

// 删除球事件
export function delBoll(bollId) {
  return request({
    url: '/aqsc/monitorboll/' + bollId,
    method: 'delete'
  })
}



//获取部门集合
export function listDept(query) {
  return request({
    url: '/system/dept/list',
    method: 'get',
    params: query
  })
}
//修改球的状态
export function changeBollStatus(bollId, bollStatus) {
  const data = {
    bollId,
    bollStatus
  }
  return request({
    url: '/aqsc/monitorboll/changeStatus',
    method: 'put',
    data: data
  })
}

//验证code唯一性
export function checkOnlyCode(query) {
  return request({
    url: '/aqsc/monitorboll/onlyCheck',
    method: 'get',
    params: query
  })
}
//获取验证码
export function checkyanzhengma(query) {
  return request({
    url: '/aqsc/monitorboll/yanzhengma',
    method: 'get',
    params: query
  })
}



